import request from '../index';

const statisticsUrl = '/statistics-server';
const baseUrl = '/base-server';
const alarmUrl = '/alarm-server';

// 电站统计
export const URL_PAGINGSTATIONTOTALINFO = `${statisticsUrl}/statisticsCentre/pagingStationTotalInfo`;
export const pagingStationTotalInfo = (params: any, pages: any) => {
  return request({
    url: `${statisticsUrl}/statisticsCentre/pagingStationTotalInfo`,
    params: { form: params, pages: pages },
  });
};

// 电站统计(统计汇总)
export const getStationTotalInfo = (params: any, isLoading: boolean = true) => {
  return request({
    url: `${statisticsUrl}/statisticsCentre/getStationTotalInfo`,
    params: { form: params, isLoading },
  });
};

// 大屏历史总览电站统计(统计汇总)
export const getHistoryTotalInfo = (params: any, isLoading: boolean = true) => {
  return request({
    url: `${statisticsUrl}/largeScreen/getHistoryTotalInfo`,
    params: { form: params, isLoading },
  });
};

// 电站统计 导出
export const EXPORT_STATIONTOTALINFO = `${statisticsUrl}/statisticsCentre/exportStationTotalInfo`;

// 终端统计
export const pagingConnectorTotalInfo = (params: any, pages: any) => {
  return request({
    url: `${statisticsUrl}/statisticsCentre/pagingConnectorTotalInfo`,
    params: { form: params, pages: pages },
  });
};

// 终端统计导出
export const EXPORT_CONNECTORTOTALINFO = `${statisticsUrl}/statisticsCentre/exportConnectorTotalInfo`;

// 运营商统计(周期)
export const pagingOperatorPeriodTotalInfo = (params: any, pages: any) => {
  return request({
    url: `${statisticsUrl}/statisticsCentre/pagingOperatorPeriodTotalInfo`,
    params: { form: params, pages: pages },
  });
};

// 运营商统计(周期) 导出
export const EXPORT_OPERATORPERIODTOTALINFO = `${statisticsUrl}/statisticsCentre/exportOperatorPeriodTotalInfo`;

// 企业统计
export const pagingOrgTotalInfo = (params: any, pages: any) => {
  return request({
    url: `${statisticsUrl}/statisticsCentre/pagingOrgTotalInfo`,
    params: { form: params, pages: pages },
  });
};

// 企业统计(汇总统计)
export const getUserTotalInfo = (params: any) => {
  return request({
    url: `${statisticsUrl}/statisticsCentre/getUserTotalInfo`,
    params: { form: params },
  });
};

// 企业统计导出
export const EXPORT_ORGTOTALINFO = `${statisticsUrl}/statisticsCentre/exportOrgTotalInfo`;

// 单个用户企业统计
export const pagingSingleOrgTotalInfo = (params: any, pages: any) => {
  return request({
    url: `${statisticsUrl}/statisticsCentre/pagingSingleOrgTotalInfo`,
    params: { form: params, pages: pages },
  });
};
// 单个用户企业统计导出
export const EXPORT_PAGINGSINFLEORGTOTALINFO = `${statisticsUrl}/statisticsCentre/exportSingleOrgTotalInfo`;

// 运营商统计(周期)
export const pagingOrgPeriodTotalInfo = (params: any, pages: any) => {
  return request({
    url: `${statisticsUrl}/statisticsCentre/pagingOrgPeriodTotalInfo`,
    params: { form: params, pages: pages },
  });
};

// 企业统计(周期)导出
export const EXPORT_ORGPERIODTOTALINFO = `${statisticsUrl}/statisticsCentre/exportOrgPeriodTotalInfo`;

// 标签总统计
export const sumUserLabelInfo = (params: any) => {
  return request({
    url: `${baseUrl}/label/sumUserLabelInfo`,
    params: { form: params },
  });
};

// 标签分页查询
export const pagingUserLabelInfo = (params: any, pages: any) => {
  return request({
    url: `${baseUrl}/label/pagingUserLabelInfo`,
    params: { form: params, pages: pages },
  });
};

// 标签列表导出
export const EXPORT_USERLABELINFO = `${baseUrl}/label/exporUserLabelInfo`;

// 单个标签查询
export const pagingUserlabelInfo = (params: any, pages: any) => {
  return request({
    url: `${statisticsUrl}/statisticsCentre/pagingUserlabelInfo`,
    params: { form: params, pages: pages },
  });
};

// 单个标签统计导出
export const EXPORT_LABELUSERINFO = `${statisticsUrl}/statisticsCentre/exportUserlabelInfo`;

// 电桩故障统计
export const getAlarmStatistics = (params: any, pages: any) => {
  return request({
    url: `${alarmUrl}/safetyAlarm/getAlarmStatistics`,
    params: { form: params, pages: pages },
  });
};

// 电桩故障统计导出
export const EXPORT_ALARMSTATISTICS = `${alarmUrl}/safetyAlarm/exportAlarmStatistics`;


// 电桩使用统计
export const pagingEquipmentInfo = (params: any, pages: any) => {
  return request({
    url: `${statisticsUrl}/statisticsCentre/pagingEquipmentInfo`,
    params: { form: params, pages: pages },
  });
};

// 电桩使用统计导出
export const EXPORT_EQUIPMENTINFO = `${statisticsUrl}/statisticsCentre/exportEquipmentInfo`;

// 大屏电站数
export const largeScreeCount = (params: any) => {
  return request({
    url: `${baseUrl}/largeScreen/largeScreeCount`,
    params: { form: params, isLoading: false },
  });
};

// 大屏终端监控
export const connectorMonitoring = (params: any) => {
  return request({
    url: `${baseUrl}/largeScreen/connectorMonitoring`,
    params: { form: params, isLoading: false },
  });
};

// 大屏电站列表
export const largeScreeStationList = (params: any) => {
  return request({
    url: `${baseUrl}/largeScreen/largeScreeStationList`,
    params: { form: params, isLoading: false },
  });
};

// 大屏昨日排名
export const pagingStationTotal = (params: any, pages: any) => {
  return request({
    url: `${statisticsUrl}/largeScreen/pagingStationTotal`,
    params: { form: params, pages, isLoading: false },
  });
};

// 大屏近10天
export const tenDayStationTotal = (params: any) => {
  return request({
    url: `${statisticsUrl}/largeScreen/tenDayStationTotal`,
    params: { form: params, isLoading: false },
  });
};

// 大屏当日订单数 订单总数 碳排放 植树
export const orderTotal = (params: any) => {
  return request({
    url: `${statisticsUrl}/largeScreen/orderTotal`,
    params: { form: params, isLoading: false },
  });
};

// 大屏查询1天的每15分钟对应的订单数
export const orderDay = (params: any) => {
  return request({
    url: `${statisticsUrl}/largeScreen/orderDay`,
    params: { form: params, isLoading: false },
  });
};


